<#-- @ftlvariable name="entity" type="com.xci.edu.core.entity.EduStudent" -->
<#include "/sys/_layout.ftl">
<!doctype html>
<html>
<head>
    <@pageHeader/>
</head>
<body>
<@pageLoading/>
<div class="jxpanel winpanel" data-fit="true">
    <form id="editform" class="jxform" method="post"
          action="${saveUrl("/background/eduStudent/","createSave","updateSave")}">
        <input name="id" value="${entity.id}" type="hidden">
        <input name="status" value="${entity.status}" type="hidden">
        <table class="table jxtable-form">
            <tr>
                <th class="w-100px">学员姓名</th>
                <td>
                    <input class="form-control" id="name" name="name" value="${entity.name}" maxlength="20" data-validate="required: [true,'请输入学员姓名']" autocomplete="off"/>
                </td>
                <th>性别</th>
                <td>
                    <select id="sex" name="sex" class="jxselect form-control" data-select-submit="true"
                            selectedValue="${entity.sex}" data-validate="required: [true,'请输入课件类型']"
                            data-allow-clear="false" >
                        <option value="男" ${web.isSelected("${entity.sex}"=="男")}>男</option>
                        <option value="女" ${web.isSelected("${entity.sex}"=="女")}>女</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th>身份证号码</th>
                <td>
                    <input class="form-control" id="idNumber" name="idNumber" value="${entity.idNumber}" maxlength="20" data-validate="required: [true,'请输入身份证号码']" autocomplete="off"/>
                </td>
                <th>手机号码</th>
                <td>
                    <input class="form-control" id="phone" name="phone" value="${entity.phone}" maxlength="30" data-validate="required: [true,'请输入手机号码']" autocomplete="off"/>
                </td>
            </tr>
            <tr>
                <th>科目名称</th>
                <td colspan="3">
                    <select class="form-control jxselect" id="eduCategoryId" name="eduCategoryId" data-text-field="eduCategoryName" data-allow-clear="true" data-validate="required: [true,'请选择科目']" >
                        <option></option>
                        <@eduCategorySelectOption selectedValue=entity.eduCategoryId></@eduCategorySelectOption>
                    </select>

                </td>
            </tr>
            <tr>
                <th>地址</th>
                <td>
                    <input class="form-control" id="address" name="address" value="${entity.address}" maxlength="100"  autocomplete="off"/>
                </td>
                <th>电子邮件</th>
                <td>
                    <input class="form-control" id="email" name="email" value="${entity.email}" maxlength="50"  autocomplete="off"/>
                </td>
            </tr>
            <tr>
                <th>备注</th>
                <td colspan="3">
                    <textarea class="form-control" name="remark" maxlength="500" rows="3" style="resize: none">${entity.remark}</textarea>
                </td>
            </tr>
        </table>
    </form>
    <div class="panel-footer text-right">
        <@isCreate>
            <button class="btn btn-primary" style="float: left" type="button" onclick="beforehandCreateSave()">
                <i class="fa fa-save"></i> 存草稿
            </button>
        </@isCreate>
        <@editFormDialogCommand/>
    </div>
</div>
<@editFormPageFooter/>
<script>
    function beforehandCreateSave() {
        $("#editform").attr("action","/background/eduStudent/beforehandCreateSave");
        $("#editform").submit();
    }
</script>
</body>
</html>
